﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ConfigureNZBLoader
{
    public partial class AddDownloadedEpisode : Form
    {
        public AddDownloadedEpisode()
        {
            InitializeComponent();
        }

        private string _Season;
        public string Season
        {
            get
            {
                return _Season;
            }
        }

        private string _Episode;
        public string Episode
        {
            get
            {
                return _Episode;
            }
        }

        private string _DownloadAddress;
        public string DownloadAddress
        {
            get { return _DownloadAddress; }
        }


        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            uint dummy;
            if (txtDownloadAddress.Text.Length > 0 && uint.TryParse(txtEpisode.Text, out dummy) && uint.TryParse(txtSeason.Text, out dummy))
            {
                DialogResult = DialogResult.OK;
                _Episode = txtEpisode.Text;
                _Season = txtSeason.Text;
                _DownloadAddress = txtDownloadAddress.Text;
                Close();
            }
        }
    }
}
